﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ESF.MUP.BasePlatform;
using ESF.MUP.BasePlatform.ApplicationServices.Interfaces;
using ESF.MUP.BasePlatform.Domain.Model;


namespace ESF.MUP.Powershell
{
    public class QuickDebug
    {
        public static void Main(String[] args)
        {

            IEnvironmentManagementService envSvc = MiddlewareManagementService.Current.GetEnvironmentService();

            String environment = "TEST";

            EnvironmentApplicatif env = envSvc.FindEnvironment(environment);
            if (env == null)
            {
                env = envSvc.AddNewEnvironment(new EnvironmentApplicatif()
                {
                    Name = environment
                });
            }

            IApplicationManagementService appSvc = MiddlewareManagementService.Current.GetApplicationService();

            Application talendApp = appSvc.GetByName("Talend");

            if (talendApp == null)
            {
                appSvc.Add(new Application()
                {
                    Name = "Talend"
                });
            }



        }
    }
}
